public class Test1 {
    public static int removeDuplicates(int[] nums) {
        boolean[] arr = new boolean[30000];

        int count = 0;

        int len = nums.length;

        for (int x : nums) {
            if (arr[x] == false) {
                count++;
                arr[x] = true;
            }
        }

        return count;
    }

    public static void main(String[] args) {
        int count = removeDuplicates(new int[]{0,0,1,1,1,2,2,3,3,4});

        System.out.println(count);
    }

}